﻿#ifndef UDPPLAY_H
#define UDPPLAY_H

#include <QAudioOutput>
#include <QObject>
#include <QUdpSocket>

class UDPPlay : public QObject
{
    Q_OBJECT
public:
    explicit UDPPlay(quint16 port,QObject *parent = 0);

public slots:
    void playData(void);
    void startPlay(void);
    void stopPlay(void);


private:
    QAudioOutput *audioOutput;
    QUdpSocket *recvSocket;
    QIODevice *playDevice;
    QAudioFormat format;
    quint16 listenPort = 1002;
};

#endif // UDPPLAY_H
